package joke.content;

import java.util.Random;

public class AdChoose {

	public static String choose(long[] weight) {
		long[] weights = new long[4];
		String re1;
		String re2;
		long Compare1;
		long Compare2;
		Random rand = new Random();
		weights[0] = weight[0] * rand.nextInt(100);
		weights[1] = weight[1] * rand.nextInt(100);
		weights[2] = weight[2] * rand.nextInt(100);
		weights[3] = weight[3] * rand.nextInt(100);
		for (int i = 0; i < 4; i++) {
			System.out.println(weights[i]);
		}
		if (weights[0] > weights[1]) {
			Compare1 = weights[0];
			re1 = "admob";
		} else {
			Compare1 = weights[1];
			re1 = "youmi";
		}

		if (weights[2] > weights[3]) {
			Compare2 = weights[2];
			re2 = "wooboo";
		} else {
			Compare2 = weights[3];
			re2 = "admob";
		}

		if (Compare1 > Compare2) {
			return re1;
		} else {
			return re2;
		}
	}
}